FROM openjdk:8-jdk-alpine

VOLUME /tmp
EXPOSE 8888
VOLUME /opt/logs

RUN mkdir -p /opt/logs/springboot-docker_log \
#	apk update && apk add --no-cache --virtual .tmp \
#  	tzdata; cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
#  	echo "Asia/Shanghai" > /etc/timezone; \
#  	apk del .tmp \
	
WORKDIR /opt
COPY /target/*.jar /opt/app.jar


ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "/opt/app.jar"]
#ENTRYPOINT ["java", "-jar", "/app.jar"]